/*
 * =====================================================================================
 *
 *       Filename:  particles.h
 *
 *    Description:  
 *
 *        Version:  1.0
 *        Created:  20.02.2010 23:50:51
 *       Revision:  none
 *       Compiler:  gcc
 *
 *         Author:  Michal Antonczak (uzyszkodnik), uzyszkodnik.priv@gmail.com
 *        Company:  
 *
 * =====================================================================================
 */

#pragma once
#include	"wektor.h"
#include	<SDL/SDL.h>
#include	<list>

struct particle{
	int life;
//	float state;
	Wektor speed;
	float x,y;
//	float maxdisp1, maxdisp2;
};

class ParticleEngine{
	private:

		SDL_Surface* particles_forms[256];
		list <struct particle *>  *particles_list;
		void process_particles();	
		SDL_Surface* screen;
		SDL_Surface* collision_map;
	public:
		float dispersion;
		ParticleEngine(SDL_Surface* scr,SDL_Surface* cm);
		~ParticleEngine();
		void display(int x, int y);
		void emit(int num, int x, int y, Wektor v);


};
